package group.sicher.salesman.dto.output;

import group.sicher.common.constant.senum.DeliveryTypeEnum;
import group.sicher.salesman.dto.input.ShopUpdateInput;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;

/**
 * @author Donald
 * @description
 * @date 2019-07-03
 **/
@ApiModel("商户资料出参")
@Setter
@Getter
public class ShopInfoOutput {
    @ApiModelProperty(value = "商户编码", required = true)
    private String shopCode;
    @ApiModelProperty(value = "商户名称", required = true)
    private String shopName;
    @ApiModelProperty(value = "商户简称", required = true)
    private String shortName;
    @ApiModelProperty(value = "省Id", required = true)
    private Long province;
    @ApiModelProperty(value = "省名", required = true)
    private String provinceName;
    @ApiModelProperty(value = "市Id", required = true)
    private Long city;
    @ApiModelProperty(value = "市名", required = true)
    private String cityName;
    @ApiModelProperty(value = "地区Id", required = true)
    private Long area;
    @ApiModelProperty(value = "地区名", required = true)
    private String areaName;
    @ApiModelProperty(value = "详细地址", required = true)
    private String address;
    @ApiModelProperty(value = "维度", required = true)
    private String latitude;
    @ApiModelProperty(value = "经度", required = true)
    private String longitude;
    @ApiModelProperty(value = "联系人", required = true)
    private String contact;
    @ApiModelProperty(value = "联系电话", required = true)
    private String contactPhone;
    @ApiModelProperty(value = "经营类目", required = true)
    private Set<Long> businessCategory;
    @ApiModelProperty(value = "门头照片", required = true)
    private String storeImg;
    @ApiModelProperty(value = "店内照片", required = true)
    private String instoreImg;
    @ApiModelProperty(value = "配送方式", required = true)
    private DeliveryTypeEnum driverType;
    @ApiModelProperty(value = "签约费率", required = true)
    private String signRate;
    @ApiModelProperty(value = "其他照片")
    private String images;
    @ApiModelProperty(value = "许可证信息", required = true)
    private ShopUpdateInput.License license;

    @Setter
    @Getter
    public static class License {
        @ApiModelProperty(value = "法人姓名", required = true)
        private String legalName;
        @ApiModelProperty(value = "法人电话", required = true)
        private String legalMobile;
        @ApiModelProperty(value = "法人证件类型", required = true)
        private Long LegalIdcardType;
        @ApiModelProperty(value = "法人证件号", required = true)
        private String legalIdcardCode;
        @ApiModelProperty(value = "营业执照号", required = true)
        private String businessCode;
        @ApiModelProperty(value = "注册地址", required = true)
        private String businessAddress;
        @ApiModelProperty(value = "许可证类型", required = true)
        private Long storeCardType;
        @ApiModelProperty(value = "许可证编号", required = true)
        private String licenseCode;
        @ApiModelProperty(value = "单位名称", required = true)
        private String licenseName;
        @ApiModelProperty(value = "失效日期", required = true)
        private Long licenseEndAt;
        @ApiModelProperty(value = "身份证正面", required = true)
        private String idcardFrontImg;
        @ApiModelProperty(value = "身份证背面", required = true)
        private String idcardBackImg;
        @ApiModelProperty(value = "手持身份证", required = true)
        private String idcardHandImg;
        @ApiModelProperty(value = "营业执照", required = true)
        private String businessImg;
        @ApiModelProperty(value = "许可证", required = true)
        private String licenseImg;
        @ApiModelProperty(value = "银行卡信息", required = true)
        private ShopUpdateInput.BankCard bankCard;
    }

    @Setter
    @Getter
    public static class BankCard {
        @ApiModelProperty(value = "开户人姓名", required = true)
        private String bankAccountName;
        @ApiModelProperty(value = "银行卡号", required = true)
        private String bankAccountCode;
        @ApiModelProperty(value = "省", required = true)
        private Long bankProvince;
        @ApiModelProperty(value = "省名", required = true)
        private String bankProvinceName;
        @ApiModelProperty(value = "市", required = true)
        private Long bankCity;
        @ApiModelProperty(value = "市名", required = true)
        private String bankCityName;
        @ApiModelProperty(value = "区", required = true)
        private Long bankArea;
        @ApiModelProperty(value = "区名", required = true)
        private String bankAreaName;
        @ApiModelProperty(value = "总行", required = true)
        private Long bankId;
        @ApiModelProperty(value = "分行", required = true)
        private Long bankBranchId;
        //TODO 开户人证件
        @ApiModelProperty(value = "开户手机号", required = true)
        private String bankMobile;
        //TODO 银行卡正面
    }

    public Integer getDriverType() {
        return driverType.getCode();
    }
}
